< previous page page_463 next page >

Page 463
0463-01.jpg
Figure 12.8.
Running the
COMBO.VBP project.
You can make selections in either of the two combo boxes and see that the label controls are updated automatically. Also, you can move through the dataset using the data control arrow buttons and watch the two combo boxes automatically update as each record changes.
Deciding When to Use the List Box or Combo Box
The choice between list and combo controls depends on the type of data-entry screen you have and the amount of real estate available to your data entry form. Typically, you should use lists where you want to show users more than one possible entry. This encourages them to scroll through the list and locate the desired record. The data-bound list control doesn't allow users to enter their own values in the list. Therefore, you should not use the data-bound list control if you want to allow users to add new values to the list.
The data-bound combo box is a good control to use when you are short on form space. You can provide the functionality of a list box without using as much space. Also, combo boxes have the added benefit of allowing users to type in their selected values. This is very useful for users who are performing heads-down data entry. They type the exact values right at the keyboard without using the mouse or checking a list. Also, novices can use the same form to learn about valid list values without slowing down the more experienced users.
The Data-Bound Grid
The data-bound grid control in Visual Basic 5 adds power and flexibility to your database programs. You can easily provide grid access to any available database. You can provide simple display-only access for use with summary data and on-screen reports. You can also provide editing capabilities to your data grid, including modify only, add rights, or delete rights.
Creating Your First Data-Bound Grid Form
It's really quite easy to create a data-bound grid form. First, start a new Visual Basic 5 project. Next, make sure you add the data-bound grid tool to your list of custom controls. To do this, select Project | Components . . . from the Visual Basic 5 main menu. Locate and select the Microsoft Data Bound Grid Control. Your screen should resemble Figure 12.9.

 
< previous page page_463 next page >

If you like this book, buy it!